﻿<html>
<head>
<title>WScript.Shell</title>
<script type="text/javascript">
function execute2() {
	var wsh = new ActiveXObject("WScript.Shell");
	var oExec = wsh.Exec("wscript //nologo wwthread.wsf");
	var stdout = '';
	while (! oExec.StdOut.AtEndOfStream) {
		stdout += oExec.StdOut.ReadLine();
		stdout += "\n";
	}
	document.getElementById("text1").value = stdout;
//	while (oExec.Status == 0) {
//	}
}
</script>
</head>
<body>
<form>
<input type=button value="実行" onclick="javascript:execute2();"><br>
<textarea id="text1" rows="20" cols="60"></textarea>
</form>
</body>
</html>
